// 页面路径：store/index.js
import Vue from 'vue'
import { createStore } from 'vuex'
// 导入子模块
import moduleCart from '@/store/cart'
import moduleUser from '@/store/user.js'
const store = createStore({
	state:{},
	getters:{},
	mutations:{},
	actions:{},
	// 模块
	modules:{
		// 引用子模块命名为my_cart
		'my_cart':moduleCart,
		'my_user':moduleUser
	}
})

export default store